import Vue from 'vue'
import Router from 'vue-router'
import Recommend from '@/components/Recommend'
import search from '@/components/search'
import singer from '@/components/singer'
import bangdanye from '@/components/bangdanye'
import singerDeail from '@/components/singerDetail/singerDetail'
import RecommendDsicList from '@/components/RecommendDsicList/RecommendDsicList'
import rankDetail from '@/components/rankDetail/rankDetail'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: '/',
      component: Recommend,
      meta: {index: 1}
    },
    {
      path: '/Recommend',
      name: 'Recommend',
      component: Recommend,
      meta: {index: 1},
      children: [
        {
          path: ':dissid',
          name: 'RecommendDsicList',
          component: RecommendDsicList,
          mata: {index: 2}
        }
      ]
    },
    {
      path: '/search',
      name: 'search',
      component: search,
      meta: {index: 1}
    },
    {
      path: '/singer',
      name: 'singer',
      component: singer,
      meta: {index: 1},
      children: [
        {
          path: ':id',
          name: 'singerDetail',
          component: singerDeail,
          meta: {index: 2}
        }
      ]
    },
    {
      path: '/bangdanye',
      name: 'bangdanye',
      component: bangdanye,
      meta: {index: 1},
      children: [
        {
          path: ':id',
          name: 'rankDetail',
          component: rankDetail,
          meta: {index: 2}
        }
      ]
    }
  ]
})
